home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / graphics / 1627 < prev    next >
Encoding:
Text File  |  1996-08-05  |  8.5 KB  |  216 lines

  1. Path: tcp.co.uk!usenet
  2. From: rooster@tcp.co.uk (rooster)
  3. Newsgroups: comp.sys.amiga.graphics
  4. Subject: Answer to our prayers?
  5. Date: 1 Mar 1996 01:00:47 GMT
  6. Organization: Total Connectivity Providers - Internet access for the UK
  7. Message-ID: <8334.6634T73T199@tcp.co.uk>
  8. NNTP-Posting-Host: du2-30.tcp.co.uk
  9. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  10.  
  11. I got the following document from the Austex web site.
  12. We have all heard how it is due to a lack of chunky gfx output that Amiga
  13. owners cannot enjoy games of a standard comparable to PC titles.The planar
  14. format means lots of bitplanes to write to.Does the product detailed below
  15. mean an end to this?Does any know about it?Anyone seen it in action?
  16. Any programmers interested?(There are development files available.Email at
  17. end of doc)Is this the thing we have been waiting for?Let's hope it isn't
  18. stupidly expensive.Let's hope it gives good quality and is easy to use
  19. and program.Or have I got it completely wrong.
  20.  
  21. AGX Module programming information
  22. Copyright (C) 1995 AUSTEX SOFTWARE
  23. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24.  
  25. OVERVIEW
  26.  
  27. The AGX module is a device which plugs into the video port of any Amiga. It
  28. has a video pass-through for standard Amiga screens and accepts standard
  29. Amiga video monitor signals.
  30.  
  31. The device can convert out-going video signals from the video port into byte per
  32. pixel format or chunky pixels. Resolutions range from 160, 320 on OCS/ECS Amiga
  33. machines to 160,320 and 640 for AGA compatible machines. Combinations of these
  34. outputs may be mixed on one screen in a similar fashion to 'viewports' on the
  35. Amiga.
  36.  
  37. The Amiga screen for a 320 resolution is a 640 hires screen in four bitplanes.
  38. Each bitplane is represented at the video port by the RGBI signals. As each
  39. bit of video information from the RGBI lines is output, it is stored into one
  40. of four shift registers where the data is then latched in byte format. As the
  41. next four bytes are fetched, the current four bytes can be displayed in sequence
  42. without any loss in data integrity.
  43.  
  44.  
  45. ACTIVATING
  46.  
  47. The device is activated by setting the GENLOCK_AUDIO flag in the BPLCON0 register
  48. for each line that the chunky mode is on. ( BPLCON0 = $100, GENLOCK_AUDIO = $100
  49. (bit8) ) This bit must remain on for each video line during the chunky screen. If
  50. the bit is cleared for one video line, the AGX device will clear the mode and the
  51. set the clock speed back to default. Doing this allows more than one type of 
  52. resolution mode per screen.
  53.  
  54. Usually, for the first few lines of the screen the 'hidden' programming information
  55. such as color palette, chunky mask, and conversion speed may by programmed. Once
  56. this has been done, the 'chunky enabled' sequence is written to the screen to allow
  57. the conversion process to take place.
  58.  
  59.  
  60. BITPLANE FORMAT
  61.  
  62. The format of the screen data can be handled by the axchunky library routines supplied
  63. with the device. This allows the user to set up all the data without specific knowledge
  64. of the current screen format etc.., but for those who wish to write directly to the screen;
  65.  
  66.         Pre-Chunky data format.
  67.                 Bitplane        Function                
  68.                 3 2 1 0         -------------------------------------
  69.  
  70.                 0 0 0 x         Reserved
  71.                 0 0 1 x         Reserved
  72.                 0 1 0 0         Reserved
  73.                 0 1 0 1         Chunky mode enable
  74.                 0 1 1 0         Clock select bit 0 set
  75.                 0 1 1 1         Clock select bit 1 set
  76.                 1 0 0 d         Pixel address register
  77.                 1 0 1 d         Color palette RAM
  78.                 1 1 0 d         Pixel read mask register
  79.                 1 1 1 x         Reserved
  80.                 
  81.                 x = Don't care    d = data (one byte)
  82.  
  83.         Screen data format type 1. OCS/ECS: 160,320 or AGA 160,320,640
  84.         
  85.                 Bitplane 0      Pixel 0, 4,  8, 12, ...
  86.                 Bitplane 1      Pixel 1, 5,  9, 13, ...
  87.                 Bitplane 2      Pixel 2, 6, 10, 14, ... 
  88.                 Bitplane 3      Pixel 3, 7, 11, 15, ... 
  89.                 
  90.         Screen data format type 2. ECS/AGA: 160 only
  91.                 
  92.                 Bitplane 0      Pixel 0, 1, 2, 3, ...
  93.                 
  94.                 (this screen mode would be defined as a single bitplane
  95.                  super-hires screen with bitplanes 1-3 pointing to bitplane 0)
  96.                  
  97.  
  98. The normal sequence for the 'hidden programming' section is;
  99.  
  100. 1. Set the clock speed
  101. 2. Set the pixel read mask register (usually $ff)
  102. 3. Set the pixel address register (usually $00)
  103. 4. Write the palette information
  104. 5. Enable chunky mode
  105.  
  106.  
  107. RAMDAC
  108.  
  109. The AGX module uses a simple RAMDAC to generate the new RGB signals. The RAMDAC
  110. contains some palette RAM, a pixel mask register, control circuitry and a fast
  111. D/A converter.
  112.  
  113. The pixel mask register can be used to control a psuedo bitplane depth, e.g.
  114. setting the pixel mask register to $3f gives the effect of 6 bitplanes worth of
  115. data. Normally this register would be set to $ff for 256 colors.
  116.  
  117. The pixel address register is normally set to the starting color for the
  118. palette writes. Normally set this to $00.
  119.  
  120. The palette RAM is written in triplet sets. Each color is represented by an 18-bit
  121. RGB value. As each color is written, an index pointer is incremented to the next
  122. color etc...
  123.  
  124.  
  125. CONVERSION SPEED
  126.  
  127. Setting the speed determines the conversion resolution. There are only three valid
  128. settings;
  129.  
  130.         Clock Select bits:
  131.              C1 C0
  132.              0  0       : 320 resolution (default)
  133.              0  1       : 640 resolution
  134.              1  0       : 160 resolution
  135.              1  1       : Reserved (no clock)
  136.  
  137. The default clock is 320 resolution. Any time that the Genlock bit is cleared for one
  138. video line the clock bits are cleared back to the default. The chunky mode is also
  139. cleared so that new programming information may be performed.
  140.  
  141.  
  142. EXAMPLE SCREEN
  143.  
  144. An example setup for a 160 resolution screen could be;
  145.  
  146.  
  147. First row
  148. Bitplane 3:     $00,...
  149. Bitplane 2:     $ff,...
  150. Bitplane 1:     $ff,...
  151. Bitplane 0:     $ff,...
  152.                  ^^ 
  153.                  |
  154.                  -------------- Set C1 bit, clock set to 160 mode
  155.  
  156. Second row
  157. Bitplane 3:     $ff,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,...
  158. Bitplane 2:     $ff,    $00,    $00,    $00,    $00,    $00,    $00,    $00,...
  159. Bitplane 1:     $00,    $00,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,...
  160. Bitplane 0:     $ff,    $00,    $00,    $00,    $00,    $10,    $10,    $10,...
  161.                  ^^      ^^     á^^      ^^     á^^     á^^     á^^     á^^
  162.                 |       |       |       |       |       |       |       |
  163.                 |       |       |       |       |       |       |       --- Color 1 Blue
  164.                 |       |       |       |       |       |       ----------- Color 1 Green
  165.                 |       |       |       |       |       ------------------- Color 1 Red
  166.                 |       |       |       |       --------------------------- Color 0 Blue
  167.                 |       |       |       ----------------------------------- Color 0 Green
  168.                 |       |       ------------------------------------------- Color 0 Red
  169.                 |       --------------------------------------------------- Starting color is 0
  170.                 ----------------------------------------------------------- Pixel mask is 255
  171.  
  172.  
  173. The next few rows contain the color triplets until all 255 colors have been defined, then
  174. finally we switch the chunky display mode on. In the example, palette color 0 is $00,$00,$00
  175. palette color1 is $10,$10,$10 etc...
  176.  
  177. Nth row
  178. Bitplane 3:     ...,    $00,...
  179. Bitplane 2:     ...,    $ff,...
  180. Bitplane 1:     ...,    $00,...
  181. Bitplane 0:     ...,    $ff,...
  182.  
  183.                          ^^
  184.                          |
  185.                          ------------------ Enable chunky mode
  186.  
  187. Nth+1 row
  188. Bitplane 3:     $00,    $04, ...
  189. Bitplane 2:     $01,    $05, ...
  190. Bitplane 1:     $02,    $06, ...
  191. Bitplane 0:     $03,    $07, ...
  192.  
  193. Would then output on the screen color 0,1,2,3,4,5,6,7 etc...  N is the number of rows required
  194. at the top of the screen to set the palette information etc.. This 160 screen is for a scrambled
  195. setup. For a true linear 160 mode, the N rows of information could be setup the same with a
  196. 320 x 4 bitplane top section and a 1280 x 1bitplane super-hires screen for rows N+1 and down.
  197.  
  198. The device will remain in chunky mode as long as the GENLOCK_AUDIO bit is set for each video
  199. line. (usually only need to set this bit in the BPLCON0 register once)
  200.  
  201.  
  202.  
  203.  
  204.  
  205. Any queries may be directed to steve@ph4227b.jcu.edu.au 
  206.  
  207. Stephen J.Smith
  208. AUSTEX SOFTWARE
  209.  
  210.  
  211.  
  212.  
  213.       Andy O'Dowd-rooster
  214.  
  215.  
  216.